package com.atguigu.edu.feign;

import com.atguigu.commonUtils.R;
import com.atguigu.edu.feign.impl.VodFileDegradeFeignClient;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@Component
@FeignClient(name = "service-vod", fallback = VodFileDegradeFeignClient.class) //调用的服务名称
public interface VodClient {

    /**
     * 根据视频ID 删除阿里云的视频
     *
     * @param videoId
     * @return
     */
    @DeleteMapping("/eduvod/video/removeALiYunVideoById/{videoId}")
    public R removeALiYunVideoById(@PathVariable("videoId") String videoId);

    /**
     * 删除多个阿里云视频的方法
     *
     * @param videoIdList
     * @return
     */
    @DeleteMapping("/eduvod/video/deleteBatchVideo")
    public R deleteBatchVideo(@RequestParam("videoIdList") List<String> videoIdList);
}
